#ifndef _HEXVIEW_PRIVATE_INCLUDED
#define _HEXVIEW_PRIVATE_INCLUDED

#include <windows.h>

#include "sequence.h"

class HexView
{
public:
	HexView(HWND h);
	~HexView(); 

	LRESULT OnPaint(WPARAM wParam, LPARAM lParam);
	void	DrawLine(HDC hdc, DWORD nLineNo);
	LRESULT OnSize(WPARAM wParam, LPARAM lParam);
	void	RenderHexData(char *buf, BYTE *data, size_w offset, size_w length);

	void SetupScrollbars();
	LRESULT OnVScroll(WPARAM wParam, LPARAM lParam);

	BOOL OpenHexFile(char *filename);
	BOOL CloseHexFile();

private:
	
	sequence seqDoc;

	HWND hwnd;
	
	int nWidth, nHeight;
	size_t nBytesPerLine;
	

	size_w nVScrollPos;
	size_w nVScrollMax;
	size_w nPageMaxLines;

	int   nHScrollPos;
	int   nHScrollMax;
	int   nPageMaxCols;
	int   nMaxDisplayWidth;

	size_w nNumLines;
	size_w nFileLength;

	int xChar, yChar;

	HFONT hFont;

};

#endif